﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SLMapApp
{
    public class ServiceClient:SLMapApp.ServiceReference2.WebServiceForMapSoapClient
    {
        public ServiceClient()
            : base()
        {
            // 获取当前silverlight应用程序配置信息 
            //App _applicationInfo = Application.Current as App;

            if (!String.IsNullOrWhiteSpace((Application.Current as App).DeploymentConfigurations["mywebservice"]))
            {
                this.Endpoint.Address = new System.ServiceModel.EndpointAddress((Application.Current as App).DeploymentConfigurations["mywebservice"]);
            }
        }
        public string GetMapIp()
        {
            string mapip = "";
            if (!String.IsNullOrWhiteSpace((Application.Current as App).DeploymentConfigurations["mapIp"]))
            {
                mapip = (Application.Current as App).DeploymentConfigurations["mapIp"];
            }
            return mapip;
        }


    }
}
